﻿using Communicate;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace MO.BusinessServer.Web
{
    public partial class Login : System.Web.UI.Page
    {
        public string Message = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            //CommunicateManage.Login("admin", "123", Session);
            //Response.Redirect("/");
            if (string.IsNullOrEmpty(Request.Form["text_user"]))
                return;
            var result = CommunicateManage.Login(Request.Form["text_user"], Request.Form["text_password"], Session);
            if (result.Result)
                Response.Redirect("/");
            else
                Message = result.Message;
        }
    }
}